import request from '@/utils/request';
import {type LogData,type UserListData,type RoleListData,type AddRoleData,type AddPerssionData,type AdduserData} from './type'

export function LogList(data:LogData){
    return request({
        url:'/UserBusinessData/GetLogList',
        method:'post',
        data
    })
}
export function RoleList(data:RoleListData){
    return request({
        url:'/UserBusinessData/GetRoleList',
        method:'post',
        data
    })
}
export function AddRole(data:AddRoleData){
    return request({
        url:'/UserBusinessData/AddRole',
        method:'post',
        data
    })
}
export function GetPermission(){
    return request({
        url:'/UserBusinessData/AddRoleShowList',
        method:'get',
       
    })
}
export function AddPermission(data:AddPerssionData){
    return request({
        url:'/UserBusinessData/AddRolePerssion',
        method:'post',
        data
    })
}
export function GetUserList(data:UserListData){
    return request({
        url:'/UserBusinessData/GetUser',
        method:'post',
        data
    })
}
export function AddUserList(data:AdduserData){
    return request({
        url:'/UserBusinessData/AddUser',
        method:'post',
        data
    })
}
export function GetRoleList(){
    return request({
        url:'/UserBusinessData/GetRole',
        method:'get',
        
    })
}
export function GetRolePermisssionById(data:any){
    return request({
        url:'/UserBusinessData/GetRolePermisssionById?roleid='+data,
        method:'get',
    })
}